package com.applancer.parser;

import java.util.List;

import org.json.JSONObject;

import com.applancer.model.GeneralModel;
import com.applancer.model.UserModel;

public class UserParser extends GeneralParser {

	@Override
	public List<GeneralModel> parseData(String json) {
		return super.parseData(json);
	}

	public GeneralModel parseModel(String str) {
		return null;
	}

	public GeneralModel parseModel(JSONObject obj) {

		UserModel user = new UserModel();
		try {
			user.setUserName(obj.getString("username").toString());
		} catch (Exception e) {

		}

		try {
			user.setEmail(obj.getString("email").toString());
		} catch (Exception e) {

		}

		try {
			user.setUrl(obj.getString("website").toString());
		} catch (Exception e) {

		}
		return user;
	}
}
